﻿namespace BusinessApplication1
{
    using System.Windows.Controls;
    using System.Windows.Navigation;
    using BusinessApplication1.Views.Login;

    /// <summary>
    /// Home page for the application.
    /// </summary>
    public partial class Home : Page
    {
        /// <summary>
        /// Creates a new <see cref="Home"/> instance.
        /// </summary>
        public Home()
        {
            InitializeComponent();

            this.Title = ApplicationStrings.HomePageTitle;
        }

        /// <summary>
        /// Executes when the user navigates to this page.
        /// </summary>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }

        private void OKButton_Click(object sender, System.Windows.RoutedEventArgs e)
        {

        }

        private void ToNextPassForm(object sender, System.Windows.RoutedEventArgs e)
        {

            ChildWindow dialog = new PasswordRecreate();
            dialog.Closed += (s, ea) =>
            {
                if (dialog.DialogResult == true)
                {
                    // Если нажали окей код


                }
                else if (dialog.DialogResult == false)
                {
                    // Если нажали отмена код

                }
                else
                {
                    //  другое не будет выводиться


                }
            };
            dialog.Show();
        }
    }
}